﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="Roles.aspx.cs" Inherits="admin_Person_Roles" %>

<%@ Register TagName="TabMenu" TagPrefix="menu" Src="~/admin/Person/Menu.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <script type="text/javascript">
         $(document).ready(function () {
             $(".addNew").colorbox({ width: "500px", height: "250", inline: true, href: "#frmAddNew" });

         });

         function closeOverlay() {
             $.colorbox.close();
         }
    </script>
    <div class="content-box-outer">
        <div class="content-box-right">
            <menu:TabMenu ID="xxxxyy" runat="server" />
        </div>
        <div class="content-box-left">
            <h1>Roles
                     <a href="#" class="addNew" title="Thêm">Thêm mới</a>



            </h1>


             <div style="display: none;">
                <div id="frmAddNew" class="overlaypanel">
                    <h2>
                        Thêm quyền</h2>
                    <ul class="fl">
                        <li>
                            <label>
                                Role</label><br />
                            <asp:TextBox runat="Server" ID="txtRoleName" Width="400" />
                           
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="Server" ValidationGroup="new"
                                ControlToValidate="txtRoleName" ErrorMessage="*" Display="Dynamic" />
                        </li>
                    </ul>
                    <asp:Button runat="server" ID="btnAdd" ValidationGroup="new" CssClass="btn primary"
                        OnClick="btnAdd_Click" OnClientClick="colorboxDialogSubmitClicked('new', 'frmAddNew');"
                        Text="Lưu" />
                    hoặc
                    <a href="#" onclick="closeOverlay();" title="Hủy">
                        Hủy</a>
                </div>
            </div>

            <div class="tableToolBox" style="display: none">
                Show: <a class="current" href="#" onclick="return ChangePostFilterType('All')">All</a>
                | <a href="#" onclick="return ChangePostFilterType('Draft')">Drafts</a> | <a href="#"
                    onclick="return ChangePostFilterType('Published')">Published</a> <span id="filteredby"></span>
                <div class="Pager">
                </div>
                <div class="PageSize">
                    <label for="pageSizeTop">
                        Items/Page</label>
                    <select id="pageSizeTop" name="pageSizeTop" onchange="return ChangePostPageSize(this)">
                        <option value="10" selected="selected">10</option>
                        <option value="25">25</option>
                        <option value="50">50</option>
                        <option value="100">100</option>
                    </select>
                </div>
            </div>
            <div id="Container">
                <%if (Count() == 0)
                  { %>
                <div class="info">
                    Chưa có bình chọn, <a href="Add_Edit.aspx" class="tooltip" title="Thêm mới chuyên mục">Thêm mới</a>.
                </div>
                <%} %>


                <div runat="server" id="divMsg" class="mInfo" visible="false" />
                <asp:GridView ID="gvPolls" runat="server" Width="100%" GridLines="None"
                    CssClass="beTable" BorderStyle="Solid" RowStyle-BorderWidth="0"
                    RowStyle-BorderStyle="None" AlternatingRowStyle-BackColor="#f8f8f8"
                    AlternatingRowStyle-BorderColor="#f8f8f8" HeaderStyle-BackColor="#F1F1F1" CellPadding="3"
                    AutoGenerateColumns="false" AutoGenerateDeleteButton="True"
                AutoGenerateEditButton="True"
                    DataKeyNames="RoleID"
                    OnRowDeleting="gvPolls_RowDeleting" OnRowEditing="gvPolls_RowEditing" 
                    OnRowUpdating="gvPolls_RowUpdating" OnRowDataBound="gvPolls_RowDataBound"
                    >
                    <HeaderStyle CssClass="gridHead" />
                      <AlternatingRowStyle BackColor="#F8F8F8" BorderColor="#F8F8F8"></AlternatingRowStyle>
                    <Columns>

                       


                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderText="ID">
                            <ItemTemplate>
                                <%# Eval("RoleID")%>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderText="Role">
                            <ItemTemplate>
                                <%# Eval("RoleName") %>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtRole" runat="server" Text='<%# Eval("RoleName") %>'></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>

                    </Columns>
                </asp:GridView>
            </div>
            <div class="Pager">
            </div>
            <div class="PageSize" style="display: none">
                <label for="pageSizeBottom">
                    Items/Page</label>
                <select id="pageSizeBottom" name="pageSizeBottom" onchange="return ChangePostPageSize(this)">
                    <option value="10">10</option>
                    <option value="25" selected="selected">25</option>
                    <option value="50">50</option>
                    <option value="100">100</option>
                </select>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {

            $(".tableToolBox a").click(function () {
                $(".tableToolBox a").removeClass("current");
                $(this).addClass("current");
            });
        });
    </script>


     
</asp:Content>





